//
//  HTHorizontalSelectionList.h
//  Hightower
//
//  Created by koki on 15-4-25.
//  Copyright (c) 2015年 MyShare. All rights reserved.
//


@protocol HTHorizontalSelectionListDataSource;
@protocol HTHorizontalSelectionListDelegate;

typedef NS_ENUM(NSInteger, HTHorizontalSelectionIndicatorStyle)
{
    HTHorizontalSelectionIndicatorStyleBottomBar,   // Default
    HTHorizontalSelectionIndicatorStyleButtonBorder
};

@interface HTHorizontalSelectionList : UIView

@property (nonatomic) NSInteger selectedButtonIndex;

@property (nonatomic, weak) id<HTHorizontalSelectionListDataSource> dataSource;
@property (nonatomic, weak) id<HTHorizontalSelectionListDelegate> delegate;

@property (nonatomic, strong) UIColor *selectionIndicatorColor;
@property (nonatomic, strong) UIColor *bottomTrimColor;
@property (nonatomic, strong) UIFont  *fontItem;
@property (nonatomic, strong) UIFont  *fontSelected;
@property (nonatomic) UIEdgeInsets buttonInsets;
@property (nonatomic,assign)float selectionIndicatorHeight;
@property (nonatomic,assign)float selectionIndicatorCornerRadius;
@property (nonatomic,assign)BOOL selectionIndicatorBorder;

@property (nonatomic) HTHorizontalSelectionIndicatorStyle selectionIndicatorStyle;
- (void)setTitleColor:(UIColor *)color forState:(UIControlState)state;
- (void)reloadData;

@end

@protocol HTHorizontalSelectionListDataSource <NSObject>

- (NSInteger)numberOfItemsInSelectionList:(HTHorizontalSelectionList *)selectionList;
- (NSString *)selectionList:(HTHorizontalSelectionList *)selectionList titleForItemWithIndex:(NSInteger)index;
@end

@protocol HTHorizontalSelectionListDelegate <NSObject>

- (void)selectionList:(HTHorizontalSelectionList *)selectionList didSelectButtonWithIndex:(NSInteger)index;

@end

